package Medicine;
//药材
public class Medicine extends Goods {
    private String date;//生产日期  2005-5-6 正则
    private int bestDate;//保质期  单位是月
    private boolean isEmpty;//判断是否药品售空

    // 七个参数  :  中药 西药

    public Medicine(int id, String name, String type, int price, int amount, String date, int bestDate) {
        super(id, name, type, price, amount);
        this.date = date;
        this.bestDate = bestDate;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public int getBestDate() {
        return bestDate;
    }

    public void setBestDate(int bestDate) {
        this.bestDate = bestDate;
    }

    public boolean isEmpty() {
        return isEmpty;
    }

    public void setEmpty(boolean empty) {
        isEmpty = empty;
    }

    @Override
    public String toString() {
        return super.toString()+
                    ", 生产日期: '" + date + '\'' +
                    ", 保质期为 '" + bestDate + "'个月" +
                    ", isEmpty=" + isEmpty +
                    '}';

    }
}